<HTML
><HEAD
><TITLE
>Search queries tracking</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"><LINK
REL="HOME"
TITLE="DataparkSearch Engine 4.50"
HREF="index.en.html"><LINK
REL="UP"
TITLE="Searching documents"
HREF="dpsearch-doingsearch.en.html"><LINK
REL="PREVIOUS"
TITLE="Relevance"
HREF="dpsearch-rel.en.html"><LINK
REL="NEXT"
TITLE="Search results cache"
HREF="dpsearch-srcache.en.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="datapark.css"><META
NAME="Description"
CONTENT="DataparkSearch - Full Featured Web site Open Source Search Engine Software over the Internet and Intranet Web Sites Based on SQL Database. It is a Free search software covered by GNU license."><META
NAME="Keywords"
CONTENT="shareware, freeware, download, internet, unix, utilities, search engine, text retrieval, knowledge retrieval, text search, information retrieval, database search, mining, intranet, webserver, index, spider, filesearch, meta, free, open source, full-text, udmsearch, website, find, opensource, search, searching, software, udmsearch, engine, indexing, system, web, ftp, http, cgi, php, SQL, MySQL, database, php3, FreeBSD, Linux, Unix, DataparkSearch, MacOS X, Mac OS X, Windows, 2000, NT, 95, 98, GNU, GPL, url, grabbing"><SCRIPT
SRC="http://www.google-analytics.com/urchin.js"
TYPE="text/javascript"></SCRIPT><SCRIPT
SRC="http://www.dataparksearch.org/ga.js"
TYPE="text/javascript"></SCRIPT></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000C4"
VLINK="#1200B2"
ALINK="#C40000"
><!--#include virtual="body-before.html"--><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>DataparkSearch Engine 4.50: Reference manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="dpsearch-rel.en.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 8. Searching documents</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="dpsearch-srcache.en.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="track"
>8.6. Search queries tracking</A
></H1
><A
NAME="AEN5184"
></A
><P
><SPAN
CLASS="application"
>DataparkSearch</SPAN
> supports query tracking.</P
><P
>When doing a search,
front-end uses table <TT
CLASS="literal"
>qtrack</TT
> to store query words, client IP address, a number of found
documents and current <SPAN
CLASS="application"
>UNIX</SPAN
> timestamp in seconds and table <TT
CLASS="literal"
>qinfo</TT
> to store
all search parameters.</P
><P
>To enable tracking, add the <TT
CLASS="literal"
>trackquery</TT
> parameter to <B
CLASS="command"
>DBAddr</B
> command
(see <A
HREF="dpsearch-indexcmd.en.html#dbaddr_cmd"
>Section 3.10.2</A
>) in your search template. For example:
<PRE
CLASS="programlisting"
>&#13;DBAddr pgsql://user:pass@localhost/search/?dbmode=cache&#38;trackquery
</PRE
>
</P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
 If you use <TT
CLASS="filename"
>searchd</TT
>, you should add this parameter only in your <TT
CLASS="filename"
>searchd.conf</TT
> file.
 </P
><P
><A
NAME="AEN5202"
></A
>
 You may use <B
CLASS="command"
>TrackDBAddr</B
> command to specify different database to store query tracking data. This database should
have the same <TT
CLASS="literal"
>qtrack</TT
> and <TT
CLASS="literal"
>qinfo</TT
> tables as in DataparkSearch's database.
 </P
></BLOCKQUOTE
></DIV
><P
>Query tracking is useful to have a statistics of your
search engine usage. To make a search queries summary, you may
execute, for example, this SQL expression:
	<PRE
CLASS="programlisting"
>&#13;SELECT qwords,count(*),sum(found),avg(found) FROM qtrack GROUP BY qwords;
</PRE
>
	</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="dpsearch-rel.en.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.en.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="dpsearch-srcache.en.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Relevance</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="dpsearch-doingsearch.en.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Search results cache</TD
></TR
></TABLE
></DIV
><!--#include virtual="body-after.html"--></BODY
></HTML
>